#include<bits/stdc++.h>
using namespace std;
int cnt=0;
int main()
{
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    map<int,int> m;
    for(int i=1;i<=n;i++)
    {
        int x;
        cin>>x;
        m[x]++;
    }
    map<int,int>::iterator it=m.begin();
    for(it++;it!=m.end();it++)
    {
		int k=it->second;
		map<int,int>::iterator it2=m.begin();
		for(;it2!=it&&k>=it2->second;it2++)
		{
			cnt+=it2->second;
			k-=it2->second;
			it2->second=0;
		}
		if(it2!=it&&it2->second>0)
		{
			it2->second-=k;
			cnt+=k;
	    }
	}
    cout<<n-cnt;
    return 0;
}

